<!--智能回复-->
{include file="public/header"}
<div class="content">
<div class="page-inner">
<div class="row">
<div class="col-md-12">
<div class="card">
	<div class="card-header">
		<h4 class="card-title">系统设置</h4>
		<br>
	</div>
	<div class="form-group">
	    <form>
		
    	<label for="successInput">账户名</label>
    	<input type="text" id="name" value="" class="form-control" placeholder="账户名"  >		
		
        <br>
        <label for="successInput">密码</label>
    	<input type="password" id="password" value="" class="form-control" placeholder="密码" >			
		<br>
        </form>
        		<button type="submit" onclick="add_api()" class="btn btn-warning">确认修改</button>
	</div>



	
</div>
</div>
</div>
</div>
</div>

{include file="public/footer"}

<script>

    function add_api(){
        
        var name = $('#name').val();
        var password = $('#password').val();
        
        if(!name || !password  ){
               $.notify({
                	icon: 'flaticon-alarm-1',
                	title: '操作提示',
                	message: '请填写关键词',
                },{
                	type: 'info',
                	placement: {
                		from: "bottom",
                		align: "right"
                	},
                	time: 1000,
                });
              return;
        }
        
      
        
        $.post('/setting_pwd',{'name':name,'password':password},function(res){
            if(res.code>0){
                $.notify({
                	icon: 'flaticon-alarm-1',
                	title: '操作提示',
                	message: res.msg,
                },{
                	type: 'info',
                	placement: {
                		from: "bottom",
                		align: "right"
                	},
                	time: 1000,
                });
            }else{

               $.notify({
                	icon: 'flaticon-alarm-1',
                	title: '操作提示',
                	message: res.msg,
                },{
                	type: 'info',
                	placement: {
                		from: "bottom",
                		align: "right"
                	},
                	time: 1000,
                });
                setTimeout(function(){location.reload()},800);
            }
        },'json');
        
    }
</script>